package com.sdry.service.impl.zc;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdry.mapper.zc.ZcLeakHuntingMapper;
import com.sdry.model.zc.ZcLeakHuntingEntity;
import com.sdry.model.zc.ZcLeakHuntingTemporaryEntity;
import com.sdry.model.zc.ZcNumberedEntity;
import com.sdry.model.zc.ZcProductTestEntity;
import com.sdry.model.zc.ZcQueryCriteria;
import com.sdry.model.zc.ZcTestEntity;
import com.sdry.service.zc.ZcLeakHuntingService;

/**
 * 
 * @ClassName:    ZcLenkHuntingServiceImpl   
 * @Description:  检漏记录
 * @Author:       zc   
 * @CreateDate:   2018年10月8日 下午5:28:29   
 * @Version:      v1.0
 */
@Service
public class ZcLeakHuntingServiceImpl implements ZcLeakHuntingService {

	@Resource
	private ZcLeakHuntingMapper zcLeakHuntingMapper;
	/**
	 * 录入检漏记录
	 */
	@Override
	public int insertLeakHunting(ZcLeakHuntingEntity zcLeakHuntingEntity) {
		return zcLeakHuntingMapper.insertLeakHunting(zcLeakHuntingEntity);
	}
	/**
	 * 改变订单状态
	 */
	@Override
	public int updateProductStatus(ZcTestEntity zcTestEntity) {
		return zcLeakHuntingMapper.updateProductStatus(zcTestEntity);
	}
	/**
	 * 将异常情况推送到不合格处置
	 */
	@Override
	public int insertProductToTest(ZcTestEntity zcTestEntity) {
		return zcLeakHuntingMapper.insertProductToTest(zcTestEntity);
	}
	/**
	 * 查找今日检漏记录
	 */
	@Override
	public List<ZcLeakHuntingEntity> selectTodayLogList(ZcQueryCriteria zcQueryCriteria) {
		return zcLeakHuntingMapper.selectTodayLogList(zcQueryCriteria);
	}
	/**
	 * 查找今日检漏记录数量
	 */
	@Override
	public int countTodayLogList(ZcQueryCriteria zcQueryCriteria) {
		return zcLeakHuntingMapper.countTodayLogList(zcQueryCriteria);
	}
	/**
	 * 通过条码查询组件数点信息
	 * @param productCode
	 * @return
	 */
	@Override
	public List<ZcNumberedEntity> selectNumberedInfoByCode(String productCode) {
		return zcLeakHuntingMapper.selectNumberedInfoByCode(productCode);
	}
	/**
	 * 通过条码查询组件历史数点信息
	 * @param productCode
	 * @return
	 */
	@Override
	public List<ZcNumberedEntity> selectNumberedInfoLogByCode(String productCode) {
		return zcLeakHuntingMapper.selectNumberedInfoLogByCode(productCode);
	}
	/**
	 * 通过条码查询组件N次检漏A、B面总数
	 * @param productCode
	 * @return
	 */
	@Override
	public ZcLeakHuntingEntity selectLeakHuntingSumN(String productCode) {
		return zcLeakHuntingMapper.selectLeakHuntingSumN(productCode);
	}
	/**
	 * 保存临时检漏数据
	 */
	@Override
	public int saveLeakHunting(
			ZcLeakHuntingTemporaryEntity zcLeakHuntingTemporaryEntity) {
		return zcLeakHuntingMapper.saveLeakHunting(zcLeakHuntingTemporaryEntity);
	}
	/**
	 * 查找堵漏临时表
	 * @param code
	 * @return
	 */
	@Override
	public ZcLeakHuntingTemporaryEntity selectLeakHuntingTabByCode(String code) {
		return zcLeakHuntingMapper.selectLeakHuntingTabByCode(code);
	}
	/**
	 * 查询日检漏记录
	 */
	@Override
	public List<ZcLeakHuntingEntity> selectTodayLogListCount(ZcQueryCriteria zcQueryCriteria) {
		return zcLeakHuntingMapper.selectTodayLogListCount(zcQueryCriteria);
	}
	/**
	 * 查询日检漏记录数量
	 */
	@Override
	public int countTodayLogListCount(ZcQueryCriteria zcQueryCriteria) {
		return zcLeakHuntingMapper.countTodayLogListCount(zcQueryCriteria);
	}

}
